package com.whg.shiro.controller;

import com.whg.shiro.domain.common.JsonData;
import com.whg.shiro.domain.dto.UserQuery;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author whg
 * @create 2022/10/12 14:04
 * @description：logout，映射shiro自带的过滤器
 */
@RestController
public class LogoutController {

    /*@RequestMapping("/logout")
    public JsonData logout(@RequestBody UserQuery userQuery){
        Subject subject = SecurityUtils.getSubject();
        if(subject.getPrincipal() != null){}
        subject.logout();
        return JsonData.buildSuccess("退出登录成功");
    }*/
}
